*To create the latent variable for willingness to punish in each sample.
sem (PunishMTurk ->  agreeprob agreeexp agreeleg ) if sample =="MTurk"
predict PunishMTurk if sample=="MTurk", latent
sem (PunishCollege ->  agreeprob agreeexp agreeleg ) if sample =="college"
predict PunishCollege if sample=="college", latent
*To create descriptives of variables in each sample.
sum PunishMTurk agreelegal agreeexpel agreeprobation agreestatement ConservTrtmnt conservative liberal moderate ConservativeBinary if sample=="MTurk"
sum PunishCollege agreelegal agreeexpel agreeprobation agreestatement ConservTrtmnt conservative liberal moderate ConservativeBinary if sample=="college"
*Analyses for Table 1: Effect of respondent ideology.  
reg PunishMTurk conservative liberal ConservTrtmnt
reg PunishCollege conservative liberal ConservTrtmnt
ologit agreestatement conservative liberal ConservTrtmnt if sample=="MTurk", or
ologit agreestatement conservative liberal ConservTrtmnt if sample=="college", or
*Analyses for Table 2: Interactions.
reg PunishMTurk ConservativeBinary#ConservTrtmnt
reg PunishCollege ConservativeBinary#ConservTrtmnt
ologit agreestatement ConservativeBinary#ConservTrtmnt if sample=="MTurk", or
ologit agreestatement ConservativeBinary#ConservTrtmnt if sample=="college", or
*Analyses for Appendix B: Moderate respondents. 
reg PunishMTurk ConservTrtmnt  if moderate==1 & sample=="MTurk"
reg PunishCollege ConservTrtmnt  if moderate==1 & sample=="college"
ologit agreestatement ConservTrtmnt  if moderate==1 & sample=="MTurk", or
ologit agreestatement ConservTrtmnt  if moderate==1 & sample=="college", or
